import pandas as pd
obj1=pd.Series([1,2,3,4])
obj2=pd.Series([5,6,7,8])
obj1.index=['a','b','c','d']
obj2.index=['c','d','e','f']

result=obj1+obj2
print('加法运算结果：')
print(result)

result=obj1-obj2
print('减法运算结果：')
print(result)

result=obj1/obj2
print('除法结果：')
print(result)

#字符串运算
obj3=pd.Series(['I ','enjoy ','Python '])
obj4=pd.Series(['really ','the ','courses '])
result=obj3+obj4
print(result)

obj5=pd.Series([True,True,False])
obj6=pd.Series([False,True,False])

#逻辑运算
result=obj5 & obj6
print('逻辑与运算：')
print(result)

result=obj5 | obj6
print('逻辑或运算：')
print(result)

result=~obj5
print('逻辑非运算：')
print(result)